#include "tDisplay.h"
#include"image.h"
#include"DrawImage.h"
#include<string>
using namespace std;

tDisplay::tDisplay(void)
{
	t=new DrawImage();
}

void tDisplay::displayFrame1 (int ind, int c)
{	
	glColor3f(1.0,0.0,0.0);
	glClear( GL_COLOR_BUFFER_BIT );
	glClearColor(1.0,1.0,1.0,0.0);
	glMatrixMode(GL_MODELVIEW);

	glLoadIdentity();
	glPointSize(2.0);
	
	//t->drawBack(ind);
	t->drawBackground(0);
	t->drawStartButton();
	t->drawHowToPlayButton();
	t->drawExitButton();
	//t->drawLogo();

	glutSwapBuffers();
	//glFlush();
}
void tDisplay::displayFrame2 (int ind,int c)
{	
	glClear( GL_COLOR_BUFFER_BIT );
	glClearColor(1.0,1.0,1.0,0.0);
	
	//t->drawBack(ind);
	t->drawBackground(c);
	//t->drawStartButton();//tagroba

	glutSwapBuffers();
	//glFlush();

}
void tDisplay::displayFrame3 (int c_num)
{
	glClear( GL_COLOR_BUFFER_BIT );
	glClearColor(1.0,1.0,1.0,0.0);

	t->darwInfo(c_num);
	t->drawContinue();

	glutSwapBuffers();
	//glFlush();

}

void tDisplay::dispalyQuestion ( int q , int score , int character )
{
	glClear( GL_COLOR_BUFFER_BIT );
	glClearColor(1.0,1.0,1.0,0.0);

	t->drawImageAtZero(q);
	t->drawScore(score);
	t->drawChar(character,620,450);

	glutSwapBuffers();
	//t->drawChar(XXXX);
}

void tDisplay::displayLoad(int x)
{
	glClear( GL_COLOR_BUFFER_BIT );
	glClearColor(1.0,1.0,1.0,0.0);

	t->drawLoad(x);

	glutSwapBuffers();
}

void tDisplay::displayChar()
{
	glClear( GL_COLOR_BUFFER_BIT );
	glClearColor(1.0,1.0,1.0,0.0);

	t->drawBack();
	t->drawChar(0,100,230);
	t->drawChar(1,250,230);
	t->drawChar(2,400,230);
	t->drawChar(3,550,230);

	glutSwapBuffers();

}
